﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESPL.CodeGenerator.Domain.ProjectBuilders;
using ESPL.CodeGenerator.Common.Generators;
using ESPL.CodeGenerator.Common.Structs;

namespace ESPL.CodeGenerator.Domain.TemplateGenerators.EntitiesGenerator
{
    partial class ProjectConfigGenerator : IBaseGenerator
    {
        #region Declarations

        private ProjectBuilderBase _projectBase;
        private ClassLibraryConfiguration _projectConfig;
        private string _references = "";
        
        #endregion

        #region Constructor

        internal ProjectConfigGenerator(ProjectBuilderBase projectBase, ClassLibraryConfiguration config)
        {
            _projectBase = projectBase;
            _projectConfig = config;

            var stringBuilder = new StringBuilder();
            foreach (var referenceItem in _projectConfig.References)
            {
                stringBuilder.Append(string.Format("using {0};,", referenceItem));
            }
            _references = stringBuilder.ToString();
            _references.Replace(",", Environment.NewLine);
        }

        #endregion
    }
}
